package day0401;


import java.util.Scanner;

public class ReverseString {
    /**
     * 遇到i反转字符串
     *
     * */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()) {
            String s = sc.nextLine();
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < s.length(); i++) {
                if (s.charAt(i) != 'i') {
                    sb.append(s.charAt(i));
                } else {
                    sb.reverse();
                }
            }
            System.out.println(sb);
        }
    }

}
